#ifndef _MAIN_CONTROL_
#define _MAIN_CONTROL_

#include <boost/filesystem.hpp>
#include <boost/mpi.hpp>
#include <cmath>
//#include <eigen3/Eigen/Dense>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

#include "../DF_Common/basis_state.h"
#include "../DF_Common/const_nucl.h"
#include "../DF_Common/coupling_coeff.h"
#include "../DF_Common/file_manage.h"
#include "../DF_Common/get_input_file.h"
#include "../DF_Common/time_count.h"
//
#include "../DF_Mpi_Sep/antisym_coeff.h"
#include "../DF_Mpi_Sep/info_wave.h"
#include "../DF_Mpi_Sep/serial_control.h"
#include "../DF_Mpi_Sep/trans_coeff.h"
#include "../DF_Common/check_file.h"

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
namespace bf = boost::filesystem;

class Main_Control {
public:
  Main_Control(string filename_t) : Filename_Input(filename_t) {}
  //
  mpi::environment env_main;
  mpi::communicator MainCom;
  //
  string Filename_Input;
  //
  LEC_CONST LECs;
  Serial_SL ser_t;
  File_Manage File_M;
  Get_Info get_info;
  //
  JaJbJ JaJbJ_t;
  CG_coeff cg_x;
  SixJ_coeff sixJ_x;
  NinJ_coeff ninJ_x;
  Binom bin_t;
  //Hobra hobra_t;
  //
  SingleP single_t;
  TripleP triple_t;
  Jacobi jaco_b;
  Jacobi_NL jaco_nl;
  //
  int Print_Mid_Flag=-1;
  //
  // Tpe_term tpe_t(LECs, wave, cg_x, sixJ_x, ninJ_x, jaco_b);
  //
  void get_input();
  //
  void init_coeff();
  void load_coeff();
  //
  void build_basis();
  void load_basis();
  //
  // void construct_wave();
  //

  // void build_TPE_MPI();
  // void build_OPE();
  // void build_cont();
  // void build_package();

  void Step_I();
  // void Step_II();
  // void Step_III();
  //
  void print_General();
  void print_General(std::ofstream &file);
  void print_LECs();
  void print_press_test();
};

#endif
